<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>快递列表</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
    <style type="text/css">
        body {
            margin: 0;
            padding: 0;
            background-color: #eeeeee;
            font-family: "楷体";
        }

        .item {
            margin: 20px;
            margin-bottom: 50px;
        }

        .imte_top {
            text-align: center;
        }

        .imte_top > span {
            font-size: 14px;
            display: inline-block;
            padding: 5px 12px;
            background-color: #ddd;
            color: #fff;
            border-radius: 5px;
        }

        .item_content {
            background-color: #fff;
            padding: 25px 15px;
            margin-top: 6px;
        }

        .item_content_top_1 {
            font-size: 24px;
            font-weight: bold;
        }

        .item_content_top_2 {
            color: #eee;
            font-size: 14px;
            margin: 5px 0px;
        }

        .item_content_top_3 {
            margin: 10px 0px;
        }

        .item_content_top_4 {
            margin: 10px 0px;
        }

        .item_content_bottom > a {
            text-decoration: none;
            color: #33e;
        }
        h1:first-child {

            color: #000000;
            background:  none;
            text-align: center;
            margin-top: 50px;
            margin-bottom: 50px;

        }
    </style>
</head>
<body>

<div class="content" id="status0Content"></div>
<div class="content" id="status1Content"></div>
<div class="content" id="expUserInfoNull"></div>

</body>
<script type="text/javascript" th:src="@{/js/jquery.min.js}"></script>
<script type="text/javascript" th:src="@{/layer/layer.js}"></script>
<script>

    // "id":210,
    // 	 "number":"1516844621515",
    // 	 "userName":"满峻宏",
    // 	 "userPhone":"18890646544",
    // 	 "company":"顺丰速运",
    // 	 "code":"660261",
    // 	 "inTime":"2022-03-14 06:14:09",
    // 	 "outTime":"未出库",
    // 	 "status":"待取件",
    // 	 "sysPhone":"18888888888"

    $(function () {
        $.getJSON("/e/wx/findExpressByUserPhone", null, function (data) {
            if (data.code == 0){
                var data1 = data.data.status0;
                console.log(data1)
                $("#status0Content").append("<h1 style=\"margin: 10px 0;color: #000000;font-size: 1.75em;font-weight: bold;border-radius: 5px;\">历史快递信息</h1>")
                // $("#status0Content").append( "<h1 style=\"margin: 10px 0;color: #000000;background:  #6FA8DC;font-size: 1.75em;font-weight: bold;border-radius: 5px;\">未取件</h1>");
                for (i = 0; i < data1.length; i++) {

                    var item = "<div class=\"item\">\n" +
                        "\t\t\t<div class=\"imte_top\"><span>" + data1[i].inTime+"</span></div>\n" +
                        "\t\t\t<div class=\"item_content\">\n" +
                        "\t\t\t\t<div class=\"item_content_top\">\n" +
                        "\t\t\t\t\t<div class=\"item_content_top_1\"><p style='color: #DE426B'>取件通知</p></div>\n" +
                        "\t\t\t\t\t<div class=\"item_content_top_2\">" + data1[i].inTime + "</div>\n" +
                        "\t\t\t\t\t<div class=\"item_content_top_3\">您有一个包裹到e栈了!</div>\n" +
                        "\t\t\t\t\t<div class=\"item_content_top_4\">\n" +
                        "\t\t\t\t\t\t取件码:<span style=\"color:#05a\">" + data1[i].code + "</span><br>\n" +
                        "\t\t\t\t\t\t快递公司:" + data1[i].company + "<br>\n" +
                        "\t\t\t\t\t\t运单号码:" + data1[i].number + "<br>\n" +
                        "\t\t\t\t\t\t站点电话:" + data1[i].sysPhone + "<br>\n" +
                        "\t\t\t\t\t</div>\n" +
                        "\t\t\t\t</div>\n" +
                        "\t\t\t\t<hr>\n" +
                        "\t\t\t\t<div class=\"item_content_bottom\">\n" +
                        "\t\t\t\t\t<a href=\"/e/wx/createQrcode/express?code=" + data1[i].code + "\">二维码</a>\n" +
                        "\t\t\t\t</div>\n" +
                        "\t\t\t</div>\n" +
                        "\t\t</div>";
                    $("#status0Content").append($(item));
                }
                // $("#status0Content").append( "<h1 style=\"margin: 10px 0;color: #000000;background:  #6FA8DC;font-size: 1.75em;font-weight: bold;border-radius: 5px;\">已取件</h1>");

                var data2 = data.data.status1;
                for (i = 0; i < data2.length; i++) {

                    var item = "<div class=\"item\">\n" +
                        "\t\t\t<div class=\"imte_top\"><span>" + data2[i].outTime + "</span></div>\n" +
                        "\t\t\t<div class=\"item_content\">\n" +
                        "\t\t\t\t<div class=\"item_content_top\">\n" +
                        "\t\t\t\t\t<div class=\"item_content_top_1\"><p style='color: #89D7BC'>取件成功通知</p></div>\n" +
                        "\t\t\t\t\t<div class=\"item_content_top_2\">" + data2[i].outTime + "</div>\n" +
                        "\t\t\t\t\t<div class=\"item_content_top_3\">您有一个包裹从e栈取出了!</div>\n" +
                        "\t\t\t\t\t<div class=\"item_content_top_4\">\n" +
                        "\t\t\t\t\t\t快递公司:" + data2[i].company + "<br>\n" +
                        "\t\t\t\t\t\t运单号码:" + data2[i].number + "<br>\n" +
                        "\t\t\t\t\t\t站点电话:" + data2[i].sysPhone + "<br>\n" +
                        "\t\t\t\t\t</div>\n" +
                        "\t\t\t\t</div>\n" +
                        "\t\t\t\t<hr>\n" +
                        "\t\t\t\t<div class=\"item_content_bottom\">\n" +
                        "\t\t\t\t\t<a href=\"#\">有疑问 ? 点了也没用</a>\n" +
                        "\t\t\t\t</div>\n" +
                        "\t\t\t</div>";
                    $("#status1Content").append($(item));
                }
            }else {
                var item = "<div class=\"item\">\n" +
                    "\t\t\t<div class=\"item_content\">\n" +
                    "\t\t\t\t<div class=\"item_content_top\">\n" +
                    "\t\t\t\t\t<div class=\"item_content_top_1\"> 暂无快递信息</div>\n" +
                    "\t\t\t\t\t<div class=\"item_content_top_4\">\n" +
                    "\t\t\t\t\t</div>\n" +
                    "\t\t\t\t</div>\n" +
                    "\t\t\t\t<hr>\n" +
                    "\t\t\t\t<div class=\"item_content_bottom\">\n" +
                    "\t\t\t\t\t<a href=\"#\">有疑问 ? 点了也没用</a>\n" +
                    "\t\t\t\t</div>\n" +
                    "\t\t\t</div>";
                $("#expUserInfoNull").append($(item));
            }

        });
    });


</script>
</html>